<?php
if (isset($_POST['action'])) {  
  switch ($_POST['action']) {  
    case 'version':  
      echo '1.0.2';  
      break;  
    case 'info':  
      $obj = new stdClass();  
      $obj->slug = 'jamnews.php';  
      $obj->plugin_name = 'jamnews.php';  
      $obj->new_version = '1.0.2';  
      $obj->requires = '3.0';  
      $obj->tested = '3.3.1';  
      $obj->downloaded = 12540;  
      $obj->last_updated = '2013-09-11';  
      $obj->sections = array(  
        'description' => 'The new version of the Jamnews plugin',  
        'another_section' => 'This is another section',  
        'changelog' => 'Some new features'  
      );  
      $obj->download_link = 'http://localhost/wp_plugins/jamnews/update.php';  
      echo serialize($obj);
    case 'license':  
      echo 'false';  
      break;  
  }  
} else {  
    header('Cache-Control: public');  
    header('Content-Description: File Transfer');  
    header('Content-Type: application/zip');  
    readfile('jamnews-1.0.2.zip');  
}
?>